<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.dmagic.cms.common.util.SpringSecurityUtils"%>
<%@ include file="/common/meta.jsp"%>
<%@ include file="/common/initCss.jsp"%>
<%@ include file="/common/initJs.jsp"%>
</head>
<body>
	<div id="body-wrapper">
		<!-- Wrapper for the radial gradient background -->
		<div id="sidebar">
			<div id="sidebar-wrapper">
				<!-- Sidebar with logo and menu -->
				<h1 id="sidebar-title">
					<a href="${ctx }">d-Magic CMS</a>
				</h1>
				<!-- Logo (221px wide) -->
				<a href="${ctx }" id="logo"><img src="${ctx}/images/logo1.png"
					alt="d-Magic logo" /></a>
				<!-- Sidebar Profile links -->
				<div id="profile-links">
					Hello, <a href="#" title="Edit your profile"><security:authentication
							property="name" /></a> &nbsp; | &nbsp;<a
						href="${ctx}/j_spring_security_logout" title="Sign Out">Sign
						Out</a> <br />
				</div>
				<ul id="main-nav">
					<!-- Accordion Menu -->
					<!-- Add the class "no-submenu" to menu items with no sub menu -->
					<li><a href="${ctx }/home/heatMap.do" class="nav-top-item no-submenu" data-menu="home"> 主頁管理 </a></li>
					<!-- Add the class "current" to current menu item -->
					<security:authorize ifAnyGranted="ROLE_ADMIN, ROLE_ProductServiceClassification, ROLE_ProductManager" >
					<li><a href="javascript:void(0)" class="nav-top-item" data-menu="product"> 產品服務 </a>
						<ul>
							<security:authorize ifAnyGranted="ROLE_ADMIN, ROLE_ProductServiceClassification" >
							<li><a href="${ctx }/category.do?type=product" data-menu="productCategory">產品服務分類</a></li>
							</security:authorize>
							<security:authorize ifAnyGranted="ROLE_ADMIN, ROLE_ProductManager" >
							<li><a href="${ctx }/product.do" data-menu="productList">產品管理</a></li>
							</security:authorize>
							<!-- Add class "current" to sub menu items also -->
						</ul>
					</li>
					</security:authorize>
					<security:authorize ifAnyGranted="ROLE_ADMIN, ROLE_SuccessfulCasesClassification, ROLE_SuccessfulCasesManager">
					<li><a href="${ctx }/successfulCase.do" class="nav-top-item" data-menu="successfulCase"> 成功案例 </a>
						<ul>
							<security:authorize ifAnyGranted="ROLE_ADMIN, ROLE_SuccessfulCasesClassification" >
							<li><a href="${ctx }/category.do?type=cases" data-menu="successfulCaseCategory">成功案例分類</a></li>
							</security:authorize>
							<security:authorize ifAnyGranted="ROLE_ADMIN, ROLE_SuccessfulCasesManager" >
							<li><a href="${ctx }/successfulCase.do" data-menu="successfulCaseList">成功案例管理</a></li>
							</security:authorize>
							<!-- Add class "current" to sub menu items also -->
						</ul>
					</li>
					</security:authorize>
					<security:authorize ifAnyGranted="ROLE_ADMIN, ROLE_NewsDynamic">
					<li><a href="${ctx }/news.do" class="nav-top-item no-submenu" data-menu="news"> 新聞動態管理 </a>
					</li></security:authorize>
					<security:authorize ifAnyGranted="ROLE_ADMIN, ROLE_ContactUs">
					<li><a href="${ctx }/company/contactUs.do" class="nav-top-item no-submenu" data-menu="contactUs"> 聯繫我們管理 </a></li>
					</security:authorize>
					<security:authorize ifAnyGranted="ROLE_ADMIN, ROLE_AboutUs">
					<li><a href="${ctx }/company/aboutUs.do" class="nav-top-item no-submenu" data-menu="aboutUs"> 關於我們管理 </a></li>
					</security:authorize>
					<li><a href="${ctx }/inquire.do" class="nav-top-item no-submenu" data-menu="inquireInfo"> 諮詢信息管理 </a></li>
					<security:authorize ifAnyGranted="ROLE_ADMIN">
					<li><a href="javascript:void(0)" class="nav-top-item" data-menu="user"> 用戶管理 </a>
						<ul>
							<li><a href="${ctx }/user/add.do" data-menu="userAdd">添加用戶</a></li>
							<li><a href="${ctx }/user.do" data-menu="userList">用戶列表</a></li>
						</ul>
					</li>
					</security:authorize>
				</ul>
			</div>
		</div>
		<!-- End #sidebar -->
		<div id="main-content">
			<!-- Main Content Section with everything -->
			<%@ include file="/common/messages.jsp"%>